<?php

/**
 * Class representation of the HTML <input type="submit" /> tag. It can be added to containers.
 *
 * @author Niels Janssen
 * @since 2008-07-10
 * @package Form.Elements
 */
class SubmitButton extends FormElement {

	function __construct( $name, $value, $properties = array() ) {
		parent::__construct( $name, array_merge( array( 'value' => $value ), $properties ) );
	}

	public function __toString( ) {
		//return '<input type="submit" name="' . ( $this->getFormName() != '' ? $this->getFormName() . '_' : '' ) . $this->name . '" value="' . $this->value . '" />';
		return '<button type="submit" name="' . ( $this->getFormName() != '' ? $this->getFormName() . '_' : '' ) . $this->name . '">' . $this->value . '</button>';
	}
}

?>